let object = {
  a: 1,
  b: 2
}
for (const key in object) {
  console.log(key);
}
for (const iterator of Object.keys(object)) {
  console.log(iterator);
}